﻿Public Class Entrega : Implements IEquatable(Of Entrega)
    Public Property IdEntrega As Integer
    Public Property IdCliente As Integer
    Public Property Fecha As Date
    Public Property NumeroProductos As Integer
    Public Property IdUsuario As Integer
    Public Property Valorada As Boolean
    Public Sub New()
        Fecha = Today.Date
    End Sub
    Public Sub New(ByVal idalumno As Integer, numeroproductos As Integer, idusuario As Integer)
        Me.IdCliente = idalumno
        Me.NumeroProductos = numeroproductos
        Me.IdUsuario = idusuario
        Fecha = Today.Date
        Valorada = False

    End Sub
    Public Sub New(ByVal idEntrega As Integer, ByVal idalumno As Integer, numeroproductos As Integer, idusuario As Integer)
        Me.IdCliente = idalumno
        Me.NumeroProductos = numeroproductos
        Me.IdUsuario = idusuario
        Me.IdEntrega = idEntrega
        Fecha = Today.Date
        Valorada = False

    End Sub
    Public Overloads Function Equals(other As Entrega) As Boolean Implements IEquatable(Of Entrega).Equals
        Return other IsNot Nothing AndAlso other.IdCliente = Me.IdCliente AndAlso other.IdEntrega = Me.IdEntrega = other.IdEntrega AndAlso other.IdUsuario = Me.IdUsuario

    End Function
End Class
